home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / clang / dflat2.zip / DIALBOX.H < prev    next >
Text File  |  1991-02-08  |  1KB  |  44 lines

  1. /* ----------------- dialbox.h ---------------- */
  2.  
  3. #ifndef DIALOG_H
  4. #define DIALOG_H
  5.  
  6. #include <stdio.h>
  7.  
  8. #define MAXCONTROLS 25
  9.  
  10. #define OFF NULL
  11. #define ON ((void *)-1)
  12.  
  13. typedef struct  {
  14.     char *title;    /* window title         */
  15.     int x, y;       /* relative coordinates */
  16.     int h, w;       /* size                 */
  17. } DIALOGWINDOW;
  18.  
  19. typedef struct {
  20.     DIALOGWINDOW dwnd;
  21.     int class;         /* LISTBOX, BUTTON, etc */
  22.     char *itext;    /* initialized text     */
  23.     char *vtext;    /* variable text        */
  24.     int command;    /* command code            */
  25.     void *wnd;        /* window handle        */
  26. } CTLWINDOW;
  27.  
  28. typedef struct {
  29.     DIALOGWINDOW dwnd;
  30.     CTLWINDOW ctl[MAXCONTROLS+1];
  31. } DBOX;
  32.  
  33. #define DIALOGBOX(db) DBOX db={
  34. #define DB_TITLE(ttl,x,y,h,w) {ttl,x,y,h,w},{
  35. #define CONTROL(ty,tx,x,y,h,w,c) {{NULL,x,y,h,w},ty,tx,NULL,c},
  36. #define ENDDB }};
  37.  
  38. #define Cancel  " Cancel "
  39. #define Ok      "   OK   "
  40. #define Yes     "  Yes   "
  41. #define No      "   No   "
  42.  
  43. #endif
  44.